#include <iostream>

using namespace std;
int main() {
    int n,temp,min=10000;
    cin>>n;
    for (int i = 0; i < n; ++i) {
        cin >> temp;
        if (temp < min) {
            min = temp;
        }
    }
        cout<<min<<endl;
        return 0;
}
